package com.heaven;

import com.heaven.dao.QueryEntityDAO;

import java.util.List;
import java.util.concurrent.Callable;

public class QueryTask implements Callable<List<Student>>{
    private QueryEntityDAO queryEntityDAO;
    private List<Integer> ids;
    public QueryTask(QueryEntityDAO queryEntityDAO, List<Integer> ids){
        this.queryEntityDAO = queryEntityDAO;
        this.ids = ids;
    }
    @Override
    public List<Student> call() throws Exception {
        //System.out.println(Thread.currentThread().toString());
        return queryEntityDAO.queryInfoList(ids);
    }
}
